package cn.zebra.dev.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * 忽略认证接口
 *
 * @author runnable@sina.cn
 */
@Configuration
@ConfigurationProperties(prefix = IgnoreAuthConfigureBean.PREFIX)
public class IgnoreAuthConfigureBean {

    static final String PREFIX = "zebra.security.ignore";

    private Boolean showdownEnable = Boolean.FALSE;

    private Boolean druidEnable = Boolean.FALSE;

    private Boolean swaggerEnable = Boolean.FALSE;

    /**
     * 允许不登录访问的Get请求
     */
    private List<String> antGet = new ArrayList<>();

    /**
     * 允许不登录访问的Post请求
     */
    private List<String> antPost = new ArrayList<>();

    public Boolean getShowdownEnable() {
        return showdownEnable;
    }

    public void setShowdownEnable(Boolean showdownEnable) {
        this.showdownEnable = showdownEnable;
    }

    public Boolean getDruidEnable() {
        return druidEnable;
    }

    public void setDruidEnable(Boolean druidEnable) {
        this.druidEnable = druidEnable;
    }

    public Boolean getSwaggerEnable() {
        return swaggerEnable;
    }

    public void setSwaggerEnable(Boolean swaggerEnable) {
        this.swaggerEnable = swaggerEnable;
    }

    public List<String> getAntGet() {
        return antGet;
    }

    public void setAntGet(List<String> antGet) {
        this.antGet = antGet;
    }

    public List<String> getAntPost() {
        return antPost;
    }

    public void setAntPost(List<String> antPost) {
        this.antPost = antPost;
    }
}
